/**
 *
 * Licensed Materials - Property of IBM 
 * 
 * OCO Source Materials 
 * 
 * (C) Copyright IBM Corp. 2011, 2012 All Rights Reserved 
 * 
 * The source code for this program is not published or other- 
 * wise divested of its trade secrets, irrespective of what has 
 * been deposited with the U.S. Copyright Office. 
 *
 */

/**
 * CHANGE HiSTORY:
 * Author             Time                 Description
 *
 */
package com.ibm.ba.demo.dao;

import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.HashMap;
import java.util.Map;

import org.springframework.dao.DataAccessException;
import org.springframework.jdbc.core.ResultSetExtractor;

public class ProductsResultSetExtractor implements
		ResultSetExtractor<Map<String, Object>> {
	public Map<String, Object> extractData(ResultSet rs) throws SQLException,
			DataAccessException {
		HashMap<String, Object> map = new HashMap<String, Object>();

		while (rs.next()) {
			
			map.put("L_PARTKEY" + "_" + rs.getInt("L_PARTKEY"),
					rs.getInt("L_PARTKEY"));
		}
		
		return map;
	}
}
